﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AIProject.Utility;

namespace AIProject.Pylos
{
    class Move
    {
        private Point source;
        private Point destination;

        public Point Source
        {
            get
            {
                return this.source;
            }
            set
            {
            }
        }

        public Point Destination
        {
            get
            {
                return this.destination;
            }
            set
            {
            }
        }

        public Move(int x1, int y1, int x2, int y2)
        {
            this.source = new Point(x1, y1);
            this.destination = new Point(x2, y2);
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override Boolean Equals(Object obj)
        {
            if (obj == null)
            {
                return false;
            }

            Move otherMove = obj as Move;

            if (otherMove == null)
            {
                return false;
            }
            else
            {
                return this.source.X == otherMove.source.X &&
                    this.source.Y == otherMove.source.Y &&
                    this.destination.X == otherMove.destination.X &&
                    this.destination.Y == otherMove.destination.Y;
            }
        }

        public Move clone()
        {
            return new Move(source.X, source.Y, destination.X, destination.Y);
        }
    }
}
